From 2a0358f6ce63e23703215a1e51d775155cee4e41 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 16 Jun 2008 18:53:17 +0000 Subject: [PATCH] =?utf8?q?Bug=20538182=20=E2=80=93=20pango=5Fcairo=5Fconte?= =?utf8?q?xt=5Fupdate=5Flayout=20is=20not=20noop=20after?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-06-16 Behdad Esfahbod Bug 538182 – pango_cairo_context_update_layout is not noop after gtk_widget_create_pango_layout * gtk/gtksettings.c (settings_update_font_options): Make sure all font option fields are set to non-DEFAULT values. svn path=/trunk/; revision=20406 --- ChangeLog | 8 ++++++++ gtk/gtksettings.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8fe493439..d98fcc46eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-16 Behdad Esfahbod + + Bug 538182 – pango_cairo_context_update_layout is not noop after + gtk_widget_create_pango_layout + + * gtk/gtksettings.c (settings_update_font_options): Make sure all + font option fields are set to non-DEFAULT values. + 2008-06-16 Michael Natterer * gtk/gtkfontsel.c diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index e0a6d72f98..a603fafc32 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1905,9 +1905,9 @@ settings_update_font_options (GtkSettings *settings) { gint hinting; gchar *hint_style_str; - cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_DEFAULT; + cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_NONE; gint antialias; - cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_DEFAULT; + cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_GRAY; gchar *rgba_str; cairo_subpixel_order_t subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT; cairo_font_options_t *options; @@ -1920,6 +1920,8 @@ settings_update_font_options (GtkSettings *settings) NULL); options = cairo_font_options_create (); + + cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_ON); if (hinting >= 0 && !hinting) { -- 2.30.2